package com.beans;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 东莞呵呵
 * Date:2022-10-21
 * Time:11:24
 */
@Controller
public class UserController4 {
    // 注⼊⽅法2：Setter注⼊
    private UserService userService;

    @Autowired
    public void setUserService(UserService userService) {
        this.userService = userService;
    }

    public void use(){
        userService.sayHi();
    }

}
